<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <% include header.ejs%>
    <title>articles</title>
</head>

<body>
  <% include nav.ejs%>
    <div class="container mt-3">
      <div class="container-fluid">
        <div class="row">
          <div class="col-12">
            <a class="btn btn-primary btn-outline-dark btn-block" href="<%= module_dir%>/articles/0" role="button">创建文章</a>
          </div>
        </div>
        <div class="row">
          <%if(list.length){%>
            <div class="col-12 bd-content mt-3">
              <div class="bd-example">
                <table class="table table-dark">
                  <thead>
                    <tr>
                      <th scope="col">id</th>
                      <th scope="col">title</th>
                      <th scope="col">introduction</th>
                      <th scope="col">分类</th>
                      <th scope="col">标签</th>
                      <!-- <th scope="col">修改时间</th> -->
                    </tr>
                  </thead>
                  <tbody>
                    <%for(i in list){%>
                      <tr>
                        <th scope="row">
                          <a href="<%= module_dir%>/articles/<%= list[i]['id']%>">
                            <%= list[i]['id']%>
                          </a>
                        </th>
                        <td width="10%">
                          <%= list[i]['title']%>
                        </td>
                        <td width="50%">
                          <%= list[i]['introduction']%>
                        </td>
                        <td>
                          <%= list[i]['category_name']%>
                        </td>
                        <td>
                          <%= list[i]['tag_name']%>
                        </td>
                        <!-- <td>
                          <%= list[i]['updated_at']%>
                        </td> -->
                      </tr>
                      <%}%>
                  </tbody>
                </table>
              </div>
            </div>
            <%}%>
        </div>
      </div>
    </div>
</body>
<script>
</script>

</html>